package com.jt.service.impl;


import com.github.pagehelper.PageHelper;
import com.jt.entity.Subject;
import com.jt.dao.SubjectMapper;
import com.jt.service.SubjectService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service


public class SubjectServiceImpl implements SubjectService {

    @Autowired
    private SubjectMapper subjectMapper;
    @Override
    public List<Subject> queryAll() {


        return subjectMapper.queryAll();
    }

    @Override
    public Integer addsubject(Subject subject) {
        return subjectMapper.addsubject(subject);
    }

    @Override
    public Integer delete(Integer id, Integer status) {
        return subjectMapper.delete(id,status);
    }

    @Override
    public Integer update(Subject subject) {
        return subjectMapper.update(subject);
    }

    @Override
    public List<Subject> querybycourseid(Integer courseid) {
        return subjectMapper.querybycourseid(courseid);
    }

    @Override
    public List<Subject> querybycontent(String content) {
        return subjectMapper.querybycontent(content);
    }
//
    @Override
    public Subject querybyid(Integer id) {
        return subjectMapper.querybyid(id);
    }

    @Override
    public Integer count() {
        return subjectMapper.count();
    }

    @Override
    public List<Subject> query(RowBounds rowBounds) {
        return subjectMapper.query(rowBounds);
    }
}
